package com.yand.oratransmysql.service.impl;

import com.yand.oratransmysql.entity.OracleTableColumnInfoBean;
import com.yand.oratransmysql.entity.OracleTableInfoBean;
import com.yand.oratransmysql.mapper.OracleTableInfoMapper;
import com.yand.oratransmysql.service.OracleTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * oracle表的处理业务类
 */
@Service
public class OracleTableServiceImpl implements OracleTableService {

    @Autowired
    private OracleTableInfoMapper oracleTableInfoMapper;


    /**
     * 查询所有的表名称
     * @return
     */
    @Override
    public List<OracleTableInfoBean> queryAllTableName() {
        return oracleTableInfoMapper.queryAllTableName();
    }

    @Override
    public List<OracleTableColumnInfoBean> queryTableColumnInfoByName(String tableName) {
        return oracleTableInfoMapper.queryTableColumnInfoByName(tableName);
    }

    @Override
    public List<Map<String, Object>> queryDataList(Map<String, Object> param) {
        return oracleTableInfoMapper.queryDataList(param);
    }

    @Override
    public BigDecimal queryDataCount(Map<String, Object> param) {
        return oracleTableInfoMapper.queryDataCount(param);
    }


}
